/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: 陈韬
 * @Date: 2020-04-25 11:31:45
 * @LastEditors: 陈韬
 * @LastEditTime: 2020-04-25 11:36:03
 */

const flat = (arr) => {
    let newArr = [];
    arr.forEach((item) => {
        if (Array.isArray(item)) {
            newArr = newArr.concat(flat(item));
        } else {
            newArr.push(item);
        }
    });
    return newArr;
}

module.exposts.flat = flat;